import request from '@/utils/request'

export function giftList() {
  return request({
    url: `/build/prize`
  })
}

export function getGiftList(params) {
  return request({
    url: `/gift/general-gift`,
    params
  })
}

export function setConfig(data) {
  return request({
    url: `/build/setting`,
    method: "post",
    data
  })
}

export function addRewardConfig(total) {
  return request({
    url: `/build/prize/rate`,
    params: {
      total
    }
  })
}

export function EditRewardConfig(data) {
  return request({
    url: `/build/prize/rate`,
    method: 'post',
    data
  })
}


export function delRewardConfig(id) {
  return request({
    url: `/build/prize/del`,
  })
}

export function changeBtnReward(id, status) {
  return request({
    url: `/build/goods/status`,
    params: {
      status,
      id
    }
  })
}

